package com.boarsoft.boar.gateway.activemq.test;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import com.boarsoft.common.util.JsonUtil;
import com.boarsoft.message.bean.Message;
import com.boarsoft.message.core.MessageService;

@Component("queue1Consumer2")
public class Queue1Consumer2 implements MessageService {
	private static final Logger log = LoggerFactory.getLogger(Queue1Consumer2.class);

	@Override
	public void put(Message msg) throws Exception {
		log.info("Got message: {}", JsonUtil.from(msg));
		Thread.sleep(200L);
		// throw new IllegalStateException("I'm not ready");
	}
}
